package neu.soft.controller;

import neu.soft.service.impl.StateUpdateServiceImpl;
import neu.soft.vo.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@CrossOrigin
@RequestMapping("/stateUpdate")
public class StateUpdateController {
    @Autowired
    private StateUpdateServiceImpl stateUpdateService;

    /**
     * 订单类型：缺货改正常
     * @param map
     * @return
     */
    @RequestMapping("/typeUpdate")
    public ResultBean typeUpdate(@RequestBody Map<String, Object> map){
        return stateUpdateService.typeUpdate(map);
    }

    /**
     * 订单状态：可分配 出库等
     * @param map
     * @return
     */
    @RequestMapping("/statusUpdate")
    public ResultBean statusUpdate(@RequestBody Map<String, Object> map){
        return stateUpdateService.statusUpdate(map);
    }
}
